#include<stdio.h>
#include<stdlib.h>

int main()
{
	struct goods
	{
		int ID;
		char *name;
		int num;
		float price;
	}*Goods;
	Goods=(struct goods *)malloc(sizeof(struct goods));
	Goods->ID=1001;
	Goods->name="苹果";
	Goods->num=100;
	Goods->price=20.5;

	printf("编号:%d\n姓名:%s\n数量:%d\n价格:%f\n",Goods->ID,Goods->name,Goods->num,Goods->price);
	return 0;
}

